package com.macrounion.atv.service.service;

import java.util.HashMap;
import java.util.List;

import com.macrounion.atv.service.entity.Channel;
import com.macrounion.atv.service.entity.ProtocolC;
import com.macrounion.base.service.service.BaseService;

public interface ChannelService extends BaseService<Channel> {

    int findCount(String deviceId,String channelCode);

    Channel getByDeviceIdandChannelCode(String deviceId,String channelCode);

    /**
     * 获取单通道结算公式样式(C(127.0.0.1:1234_001))
     * @param c
     * @return
     */
	String getFxKey(String deviceCode,String channelCode);
    int updateTranslate(Channel channel);

    int updateChannelCode(Channel channel);

    int batchUpdate(HashMap<String,Object> mapChannel);

    /**
     * 只清除协议通道，不清除虚拟通道
     * @param deviceId
     * @return
     */
    int clearChannelByDeviceId(String deviceId);

    /**
     * 初始化协议通道
     * @param deviceId
     * @return
     */
    int initProtocolChannel(String deviceId);

    /**
     * 还原协议通道名
     * @param deviceId
     * @return
     */
    int reductionChannelName(String deviceId);

    /**
     * 查找设备下的所有通道
     * @param deviceId
     * @param searchStr
     * @return
     */
    List<Channel> getChannelListByDevice(String deviceId,String searchStr,Boolean isVirtual);

	String getChannelCode(String channelCode);

	List<Channel> getChannelListByIds(List<String> ids);

	Channel getVirtualChannel(String virtualId);

    boolean removeByVirtualId(String virtualId);

    List<ProtocolC> getRepeatChannelList(String deviceId);

	List<Channel> getAll();

}